package com.ndhutu.ee.util;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * 验证器
 */
public class ValidatorUtil {

    /**
     * 校验手机号
     * @param phone
     * @return
     */
    public static boolean verifyPhone(String phone){
        if(phone == null){
            return false;
        }
        String regex = "^1\\d{10}$";
        Pattern p = Pattern.compile(regex);
        Matcher m = p.matcher(phone);
        return m.matches();
    }
}
